package com.why.day05_work3.presenter;

import android.util.Log;



import com.why.day05_work3.base.BasePresenter;
import com.why.day05_work3.bean.NaviBean;
import com.why.day05_work3.model.MainModel;
import com.why.day05_work3.net.ResultCallBack;
import com.why.day05_work3.view.MainView;

public class MainPresenter extends BasePresenter<MainView> {

    private MainModel mMainModel;


    public void getData() {
        mMainModel.getData(new ResultCallBack<NaviBean>() {
            @Override
            public void onSuccess(NaviBean bean) {
                mView.setData(bean);
            }

            @Override
            public void onFail(String msg) {
                Log.d("tag", "onFail: "+msg);
            }
        });
    }

    @Override
    public void initModel() {
        mMainModel = new MainModel();
        addModel(mMainModel);
    }
}
